<template lang="pug">
  .zjy-xx
    .item-title 增减员信息
    scrollLi.item-container(:data="changeList" :class-option="classOption")
      ul
        li(v-for="(item,index) in changeList" :key="index")
          div.text
            span {{item.name}}
            span.content {{item.content}}
          div.time {{item.createTime.slice(5, 16).replace(/T/g, ' ')}}
          
</template>

<script>
import scrollLi from 'vue-seamless-scroll'

export default {
  name: 'change',
  components: {
    scrollLi
  },
  props: {
    changeList: Array
  },
  data () {
    return {
      // list: [0,1,2,3,4,5,6,7,8,9]
    }
  },
  computed: {
    classOption () {
      return {
        // singleHeight: 36,
        // waitTime: 2000,
        step: 0.5,
        hoverStop: false 
      }
    }
  }
}
</script>

<style lang="less" scoped>
  .zjy-xx{
    overflow: hidden;
    background-image: url('../../../assets/images/data-screening/xx-bg-c.png');
    padding: .5rem .3rem .22rem .26rem;
    .item-title{
      position: absolute;
      top: .1rem;
      left: 50%;
      transform: translate(-50%, 0);
      color: #0bafe5;
      font-size: .12rem;
      line-height: .12rem;
      font-weight: bold;
    }
  }
  .item-container{
    height: 100%;
    overflow: hidden;
    li{
      position: relative;
      height: 36px;
      font-size: .14rem;
      line-height: 36px;
      padding-left: .35rem;
      background-color:rgba(38,67,153,.1);
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      display: flex;
      justify-content: space-between;
      padding-right: .1rem;
      &:before{
        content: '';
        position: absolute;
        top: 50%;
        margin-top: -0.03rem;
        left: .17rem;
        width: .06rem;
        height: .06rem;
        border-radius: 50%;
        background-color: #0bafe5;
      }
      &:nth-of-type(2n){
        background-color:rgba(38,67,153,.3);
      }
      div{
        &.text{
          flex: 1;
          color: #fff;
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
          // span.name{
          //   display: inline-block;
          //   width: 50px;
          // }
          span.content{
            color: #0bafe5;
            margin-left: .1rem;
          }
        }
        &.time{
          color: #eee;
          font-size: .12rem;
          margin-left: .1rem;
        }
      }
    }
  }
</style>
